<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//后端
Route::any('/login','AdminController@login')->name('login');
Route::any('/loginout','AdminController@loginout')->name('login');
Route::group([ 'middleware' => ['login']], function() {
    //学校管理
    Route::any('/admin/category','CategoryController@index')->name('categorylist');
    Route::any('/admin/category/add','CategoryController@add');
    Route::any('/admin/category/edit/{id}','CategoryController@edit');
    Route::any('/admin/category/del_category','CategoryController@del_category');
    //学院管理
    Route::any('/admin/collegelist/{id}','CategoryController@collegelist');
    Route::any('/admin/collegeadd/{id}','CategoryController@collegeadd');
    Route::any('/admin/collegeedit/{id}/school/{s_id}','CategoryController@collegeedit');
    Route::any('/admin/collegedel','CategoryController@collegedel');
    Route::any('/admin/postcollegeedit/{id}','CategoryController@postcollegeedit');

    //宿舍管理
    Route::any('admin/room/{id}','RoomController@index');
    Route::any('admin/room/edit/{id}','RoomController@edit');
    Route::any('admin/room/add/{id}','RoomController@add');
    Route::any('/admin/roomedit/{id}/school/{s_id}','RoomController@edit');

    //文章管理
    Route::any('/admin/article/articlelist','ArticleController@index')->name('articlelist');
    Route::any('/admin/article/add','ArticleController@add');
    Route::any('/admin/article/edit/{id}','ArticleController@edit');
    Route::any('/admin/article/del_article','ArticleController@del_article');
    //广告管理
    Route::get('/adv/index','AdvController@index');
    Route::any('/adv/edit/{id}','AdvController@edit');
    Route::any('/adv/add','AdvController@add');
    Route::any('/admin/adv/del','AdvController@del');

    //支付参数
    Route::any('/admin/pay/index','PayController@index');
    Route::any('/admin/pay/edit/{id}','PayController@edit');
    Route::any('/admin/pay/postedit','PayController@postedit');

    //自定义参数
    Route::any('/admin/custom/index','CustomController@index');
    Route::any('/admin/custom/edit/{id}','CustomController@edit');
    Route::any('/admin/custom/postedit','CustomController@postedit');
    //自定义时间
    Route::any('/admin/time/index','TimeController@index');
    Route::any('/admin/time/edit/{id}','TimeController@edit');
    Route::any('/admin/time/postedit','TimeController@postedit');
    Route::any('/admin/time/add','TimeController@add');
    Route::any('/admin/time/del','TimeController@del');
    //

    //快递管理
    Route::any('/admin/express/index','ExpressController@index');
    Route::any('/admin/express/add','ExpressController@add');
    Route::any('/admin/express/edit/{id}','ExpressController@edit');
    Route::any('/admin/express/del','ExpressController@del');

    Route::any('/admin/express/expresslist','ExpressController@expresslist');
    Route::any('/admin/express/add','ExpressController@add');
    Route::any('/admin/express/edit/{id}','ExpressController@edit');
    Route::any('/admin/express/del','ExpressController@del');



    //用户管理
    Route::any('/admin/user/index' , 'UserController@index');
    Route::any('/admin/user/del' , 'UserController@del');
    Route::any('/admin/user/test' , 'UserController@test');
    Route::any('/admin/user/edit/{id}' , 'UserController@edit');

    //订单管理
    Route::any('/admin/order/index' , 'OrderController@index');
    Route::any('/admin/order/del' , 'OrderController@del');
    Route::any('/admin/order/expressorder' , 'OrderController@expressorder');
    Route::any('/admin/order/expressorder_del' , 'OrderController@expressorder_del');

    //寄件相关
    Route::any('/admin/appointment/index' , 'AppointmentController@index');
    Route::any('/admin/appointment/edit/{id}' , 'AppointmentController@edit');
    Route::any('/admin/appointment/del' , 'AppointmentController@del');


    Route::any('/','AdminController@index')->name('index');
    //Route::get('/','AdminController@typelist')->name('typelist');
    Route::get('/admin/typelist','AdminController@typelist')->name('typelist');
    Route::get('/admin/addtype/','AdminController@addtype')->name('addtype');
    Route::any('/admin/showTypeExcel/','AdminController@showTypeExcel')->name('showTypeExcel');
    Route::post('/admin/postTypeExcel/','AdminController@postTypeExcel')->name('postTypeExcel');
    Route::any('/admin/searchTypeList/','AdminController@searchTypeList')->name('searchTypeList');
    Route::post('/admin/deleteType/','AdminController@deleteType')->name('deleteType');
    Route::get('/admin/editType/{id}','AdminController@editType')->name('editType');
    Route::post('/admin/postEditType','AdminController@postEditType')->name('postEditType');
    Route::any('/admin/detailAdd','AdminController@detailAdd')->name('detailAdd');
    Route::any('/admin/detailList','AdminController@detailList')->name('detailList');
    Route::any('/admin/getType','AdminController@getType')->name('getType');
    Route::any('/admin/searchDetailList','AdminController@searchDetailList')->name('searchDetailList');
    Route::any('/admin/getEditDetail/{id}','AdminController@getEditDetail')->name('getEditDetail');
    Route::any('/admin/postDetaiEdit','AdminController@postDetaiEdit')->name('postDetaiEdit');
    Route::any('/admin/deleteDetail','AdminController@deleteDetail')->name('deleteDetail');


});
Route::any('/user/login','UserController@login')->name('userlogin');
Route::group(['middleware' => ['userlogin']], function() {
//前端相关
    Route::get('/home/show', 'HomeController@show');
    Route::any('/home/show_article/{id}', 'HomeController@show_article');
    Route::any('/home/show_article_cishan/{id}', 'HomeController@show_article_cishan');
    Route::any('/home/cishan', 'HomeController@cishan');
    Route::any('/home/action', 'HomeController@action');
    Route::any('/home/shanlin', 'HomeController@shanlin');
    Route::any('/xingshan', 'HomeController@xingshan');
    Route::any('/home/selfshan', 'HomeController@selfshan');
    Route::any('/home/pay/{price}', 'HomeController@pay');
    Route::any('/home/addorder/{price}', 'HomeController@addorder');

});


//微信相关
Route::any('/wx' , 'WxController@index');
Route::any('/wx/createmenu' , 'WxController@createmenu');
Route::any('/wx/get_user_info' , 'WxController@get_user_info');

Route::any('/wx/template_message' , 'WxController@template_message');

Route::any('/home/test' , 'HomeController@test');
Route::any('/payok' , 'OrderController@payok');
Route::any('/test' , 'OrderController@test');


Route::any('/user/login','UserController@login');
Route::any('/user/loginout','UserController@loginout');
Route::any('/user/add_user_tixing','UserController@add_user_tixing');
Route::any('/user/cancel_user_tixing','UserController@cancel_user_tixing');

//接口相关
Route::any('/api/getOpenid' , 'ApiController@getOpenid');
Route::any('/api/upload_userinfo' , 'ApiController@upload_userinfo');
Route::any('/api/edit_userinfo' , 'ApiController@edit_userinfo');
Route::any('/api/get_school' , 'ApiController@get_school');
Route::any('/api/get_college' , 'ApiController@get_college');
Route::any('/api/custom' , 'ApiController@custom');
Route::any('/api/get_express' , 'ApiController@get_express');
Route::any('/api/work_time' , 'ApiController@work_time');
Route::any('/api/add_express_order' , 'ApiController@add_express_order');
Route::any('/api/get_article' , 'ApiController@get_article');
Route::any('/api/get_room' , 'ApiController@get_room');
Route::any('/api/get_logo' , 'ApiController@get_logo');
Route::any('/api/get_member_price' , 'ApiController@get_member_price');
Route::any('/api/add_appointment' , 'ApiController@add_appointment');
Route::any('/api/order_pay' , 'ApiController@order_pay');
Route::any('/api/getpaysign' , 'ApiController@getPaySign');
Route::any('/api/get_user_info' , 'ApiController@get_user_info');
Route::any('/api/user_open_membership' , 'ApiController@user_open_membership');
Route::any('/api/get_user_order_qujian' , 'ApiController@get_user_order_qujian');
Route::any('/api/get_user_appointment_order' , 'ApiController@get_user_appointment_order');
Route::any('/api/get_user_express_order' , 'ApiController@get_user_express_order');
Route::any('/api/get_one_express_order' , 'ApiController@get_one_express_order');




Route::any('/api/test' , 'ApiController@test');







